$(function () {

    //首页
    $('.featureGuest').flickity({
        cellAlign: "center",
        wrapAround: !0,
        pageDots: !0,
        prevNextButtons: !0,
        autoPlay: 6000,
    })

    $('.featureGuestOther').flickity({
        groupCells: 2,
    })

    //广告
    $('.home_ads').flickity({
        cellAlign: "center",
        wrapAround: false,
        pageDots: true,
        initialIndex: 0
    })

    var $badge = $('.listItem').find('.badge.ranking');
    $badge.each(function (i) {
        var i = $badge.index(this);
        $badge.eq(i).text(i + 1);
    });


    //分类课程列表页面
    $('.categoryTopHeadList').flickity({
        "wrapAround": true,
        // "autoPlay": 2800
    })

})
